a,n=map(int,input().split())
s=0
t=0
for i in range(n):
    t=t*10+a
    s+=t
print("s = %d"%s)